from django.contrib import admin
from .models import *

# Register your models here.

class ping_test_db_admin(admin.ModelAdmin):
    list_display = ['ip','ip_wangguan','ip_time','ip_tong','update_ping_out_time']
    list_per_page = 20
    search_fields = ['ip']
    list_filter = ('ip_wangduan','ip_tong','ip_wangguan')
    ordering = ('-update_ping_out_time',)


class pc_db_admin(admin.ModelAdmin):
    list_display = ['name','officehome','OSType','ComputerName','CPUModel','RAMSize','DisplayCard','Manufacturer','IPAddress','MACAddress','USB','today']
    list_per_page = 20
    search_fields = ('name','IPAddress')





class ping_test_wangduan_db_admin(admin.ModelAdmin):
    list_display = ['ip_wangduan','ip_out']
class web_db_admin(admin.ModelAdmin):
    list_display = ['officeid','name','doing']




admin.site.register(ping_test_db,ping_test_db_admin)
admin.site.register(ping_test_wangduan_db,ping_test_wangduan_db_admin)
admin.site.register(pc_db,pc_db_admin)
admin.site.register(web_db,web_db_admin)

admin.site.site_header = '桌面综合管理'
admin.site.site_title = '桌面综合管理'

